package com.lgc.provider01.controller;

import com.lgc.provider01.entity.Staff;
import com.lgc.provider01.mapper.StaffMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 员工控制类
 * @author lvguangchun
 * @create 2022-08-29 11:06
 */

@RestController
@RequestMapping("/staff")
@Api(tags = "/员工控制类")
public class StaffController {

    @Resource
    private StaffMapper staffMapper;

    //给接口加注释
    @ApiOperation(value = "获取员工信息接口")
    @GetMapping("/staff")
    public List<Staff> getStaff(){
        return staffMapper.selectList(null);
    }
}
